

<#list users as u>
    <li id="userId" data-id="789434" data-logo="" data-lv="37" data-name="小明">
        <img src="${u.headImgUrl}"
             height="16" width="16">
        <span class="name">${u.nickname}</span>
        <#if u.gender == 2>
            <i class="gender female"></i>
        </#if>
        <#if u.gender == 1>
            <i class="gender male"></i>
        </#if>
        <span class="lv">Lv.${u.level}</span>
        <i class="i-selected"></i>
    </li>
</#list>
<script>
    $("li[id^='userId']").mouseover(function () {
        $(this).css("background-color", "#f8f8f8");
    });
    $("li[id^='userId']").mouseout(function () {
        $(this).css("background-color", "");
    });
    $("li[id^='userId']").click(function () {
        $(this).addClass("on");
    });


    $("#add_blacklist").click(function () {
        $("#blacklist").append($(".search-list > li[class='on']"));
    });
</script>